package com.code.pattern.decorator;

/**
 * 抽象的装饰类
 * @author: liyufei
 * @date: 2021-04-03 21:52
 */
public class AbstractDecorator extends ABattercake {

    private ABattercake aBattercake;

    public AbstractDecorator(ABattercake aBattercake) {
        this.aBattercake = aBattercake;
    }

    // 加一个抽象方法，子类实现做具体业务逻辑
    // public abstract void doSomething();

    @Override
    public String getDesc() {
        return this.aBattercake.getDesc();
    }

    @Override
    public int cost() {
        return this.aBattercake.cost();
    }
}
